#ifndef _UARTTASK_H_
#define _UARTTASK_H_

#include "main.h"

#define uartbufflength 128

typedef enum
{
	CHANNEL1 = 1,
	CHANNEL2,
	CHANNEL3,
	CHANNEL4,
	CHANNEL5,
	CHANNEL6
}T_UART_CHANNEL;

typedef struct
{
	uint16_t length;
	uint8_t  rxbuff[uartbufflength];
}T_UARTMSG;

void uartconfig(void);
void USART_RxIdleCallback(UART_HandleTypeDef *huart);
__weak void uart1_rxcallback(uint8_t *rxdata,uint16_t len);
__weak void uart2_rxcallback(uint8_t *rxdata,uint16_t len);
__weak void uart3_rxcallback(uint8_t *rxdata,uint16_t len);
__weak void uart4_rxcallback(uint8_t *rxdata,uint16_t len);
__weak void uart5_rxcallback(uint8_t *rxdata,uint16_t len);
__weak void uart6_rxcallback(uint8_t *rxdata,uint16_t len);

#endif
